import java.util.Arrays;
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int k=scanner.nextInt();
        int[]a=new int[n];
        for (int i=0;i<n;i++){
            a[i]=scanner.nextInt();
        }
        System.out.println(minimizeSum(a,k));
    }

    private static int minimizeSum(int[] arr, int k) {
        Arrays.sort(arr);
        for(int i=0;i<arr.length;i++){
            int temp=arr[i];
            arr[i]=arr[arr.length-1-i];
            arr[arr.length-1-i]=temp;

        }
        for (int i=0;i<arr.length&&k>0;i++){
            if(arr[i]%2==0){
                arr[i]/=2;
                k--;
            }
        }

        int sum=0;
        for (int num:arr){
            sum+=sum;

        }
        return sum;
    }
}
